package cn.dong.edu.feign;

import cn.dong.api.domain.CommonResult;
import cn.dong.edu.feign.fillback.VodServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "service-vod9000", fallback = VodServiceImpl.class)
@Component
public interface VodService {

    /**
     * 删除视频
     *
     * @param videoId
     * @return
     */
    @GetMapping("/vod/delete/{videoId}")
    CommonResult delFile(@PathVariable("videoId") String videoId);


    /**
     * 批量删除视频
     * @param videoIds
     * @return
     */
    @PostMapping("/vod/deleteByIds")
    CommonResult deleteByIds(@RequestBody List<String> videoIds);


}
